﻿using project.B12.Model.BaseModel;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace project.B12.Model.Models
{
     /// <summary>
     /// 药敏板记录表
     /// </summary>
    [SugarTable("TB_His")]
    [TenantAttribute("1")]//对应ConfigId
    public class Table_His : AggregateRootEntity 
    {
        public Table_His() { }

        ////IsIdentity 自增列
        ////IsPrimaryKey 创建主键
        ////ColumnName   实体类数据库列名不一样设置数据库列名
        ////IsIgnore     IsIgnore=true表示 ORM 所有操作不处理这列
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int ID { get; set; }

        /// <summary>
        /// 药敏板名称
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string PlateName { get; set; }

        /// <summary>
        /// 药敏板类型
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string PlateType { get; set; }

        /// <summary>
        /// 菌名称
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string BacterialName { get; set; }

        /// <summary>
        /// 样本ID
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string BacterialID { get; set; }

        /// <summary>
        /// 是否特殊加样
        /// </summary>
        [SugarColumn(IsNullable = false)]
        public bool IsSpecialSample { get; set; }

        /// <summary>
        /// 特殊加样的菌名称
        /// </summary>
        [SugarColumn(IsNullable = true, IsJson = true)]
        public Dictionary<string, List<int>> SpecialSampleTypes { get; set; }

        /// <summary>
        /// 特殊加样,是否按列加样
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public bool IsColumn { get; set; }

        /// <summary>
        /// 板的加载时间
        /// </summary>
        [SugarColumn(IsNullable = false)]
        public DateTime LoadTime { get; set; }

        /// <summary>
        /// 加样完成时间
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public DateTime? SampleTime { get; set; }

        /// <summary>
        /// 最高温度
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public float Tmax {  get; set; }

        /// <summary>
        /// 最高温度
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public float Tmin { get; set; }

        /// <summary>
        /// 是否发生关机
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public bool ShutdownOrNot {  get; set; }

        /// <summary>
        ///拍照时间
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public DateTime? PhotographyTime { get; set; }


    }
}